package com.woniu.service.medicalService.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniu.mapper.medicalService.HospitalReservationMapper;
import com.woniu.service.medicalService.IHospitalReservationService;
import com.woniu.model.medicalService.entity.HospitalReservation;
import org.springframework.stereotype.Service;

import java.util.List;

//医院预约表
@Service
public class HospitalReservationServiceImpl extends ServiceImpl<HospitalReservationMapper, HospitalReservation> implements IHospitalReservationService {

    //按医院id查询所有预约
    @Override
    public List<HospitalReservation> findByHospitalId(Long hospitalId) {
        return list(Wrappers.lambdaQuery(HospitalReservation.class)
                .eq(HospitalReservation::getHospitalId,hospitalId));
    }

}
